home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
DBTOOLC.LZH
/
SOURCE.ARC
/
DCTMSG.C
< prev
next >
Wrap
C/C++ Source or Header
|
1986-10-17
|
1KB
|
56 lines
#include <stdio.h>
#ifndef AZTEC
#include <dos.h>
#endif
extern char *CFuncArgs;
extern char *errmsg[];
extern int DB_ERROR, DB_ERRFLG, DB_BELLFLG;
extern int DB_E_VAR, DB_E_bx;
#ifdef MS
#define SetERet(val) poke(DB_E_VAR, DB_E_bx, &val, 8)
#endif
#ifdef LATTICE
#define SetERet(val) poke(DB_E_VAR, DB_E_bx, (char *)&val, 8)
#endif
#ifdef AZTEC
extern int Our_Ds;
#define SetERet(val) movblock(&val, Our_Ds, DB_E_bx, DB_E_VAR, 8)
#endif
dctmsg(msgno)
int msgno;
{
int i;
int buffer[80*5*2];
char *hitmsg = "Press any key to continue";
double temp;
if (DB_ERRFLG)
{
if (DB_BELLFLG)
sound(500,2);
putwindow(1,0,4,79,buffer,1,1);
curlocat(2,1);
printf("CFUNC CALL: %s",CFuncArgs);
curlocat(3,1);
printf("DCTMSG: %s",errmsg[msgno]);
i = 0;
while (hitmsg[i])
{
curlocat(4,i+45);
wrtchatr(1,hitmsg[i++],26,0);
}
getkeycl(&i);
if (i != 0x1b)
rstwindo(1,0,4,79, buffer);
}
DB_ERROR = msgno;
temp = (double) DB_ERROR;
SetERet(temp);
return(DB_ERROR);
}